package com.sunducation.wts.lifecycle

import android.content.Context
import android.net.Uri
import android.os.Bundle
import androidx.fragment.app.Fragment
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
private const val ARG_PARAM1 = "param1"
private const val ARG_PARAM2 = "param2"


class My1Fragment : Fragment() {
    private lateinit var lifeCycleObserver : MyFragmentLifeCycleObserver
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        lifeCycleObserver = MyFragmentLifeCycleObserver()
        lifecycle.addObserver(lifeCycleObserver)
    }

    override fun onDestroy() {
        super.onDestroy()
        lifecycle.removeObserver(lifeCycleObserver)
    }

    override fun onCreateView(
        inflater: LayoutInflater, container: ViewGroup?,
        savedInstanceState: Bundle?
    ): View? {
        return inflater.inflate(R.layout.fragment_my1, container, false)
    }



    companion object {
        @JvmStatic
        fun newInstance(param1: String, param2: String) =
            My1Fragment()
    }
}
